'''
Created on 2019年8月23日
@author: sida
'''
import compute_TxtTFIDFSimilarity as c_tfidf
from util import Node

tfidfSimilarity_path = 'cache/tfidfSimilarity'
node_get_corpus = Node(name='tfIdf_get_corpus',compute=c_tfidf.tfIdf_get_corpus,persistence_path='cache/tfIdf_get_corpus')
node_tfidfSimilarity = Node(name='tfidfSimilarity',compute=c_tfidf.tfidfSimilarity,sunNodes=[node_get_corpus],persistence_path=tfidfSimilarity_path)
node_inference_tfidfSimilarity = Node(name='inference_tfidfSimilarity',compute=c_tfidf.inference_tfidfSimilarity,sunNodes=[node_tfidfSimilarity,node_get_corpus],forceUpdate=True,save=False)

if __name__ == '__main__':
    compulsory_Update_Nodes = [ node_inference_tfidfSimilarity ]
    NoForce_Update_Nodes = []
    wanted_Nodes = NoForce_Update_Nodes + compulsory_Update_Nodes
    for node in compulsory_Update_Nodes:
        node.forceUpdate=True
    [print(type(node.getData())) for node in wanted_Nodes]
    
    
    
